# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer:
pkgname=gfan
pkgver=0.6.2
pkgrel=1
pkgdesc="Software package for computing Grobner fans and tropical varieties"
url="http://home.imf.au.dk/jensen/software/gfan/gfan.html"
# armhf, armv7, x86: hang during tests
arch="all !armhf !armv7 !x86"
license="GPL-2.0-or-later"
makedepends="cddlib-dev gmp-dev"
source="https://users-math.au.dk/jensen/software/gfan/gfan$pkgver.tar.gz"
builddir="$srcdir/$pkgname$pkgver"

build() {
	export CFLAGS="${CFLAGS/-Os/-O3}" # gotta go fast
	sed -i 's/#include "cdd/#include "cddlib/' src/*.cpp
	make
}

check() {
	make check
}

package() {
	make PREFIX="$pkgdir"/usr install
}

sha512sums="
5961820750af2522fdc1a86c0254742c3b003607a8707df5d6cd5f0bc6461e4d3db3b1d3cb537979d57eb9dff387974a58aeb91d0b5246d7c701cadc5a2cf4cf  gfan0.6.2.tar.gz
"
